<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>编辑医生排班</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" th:href="@{/plugins/fontawesome-free/css/all.min.css}">
    <link rel="stylesheet" th:href="@{https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css}">
    <link rel="stylesheet" th:href="@{/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css}">
    <link rel="stylesheet" th:href="@{/plugins/icheck-bootstrap/icheck-bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/plugins/jqvmap/jqvmap.min.css}">
    <link rel="stylesheet" th:href="@{/dist/css/adminlte.min.css}">
    <link rel="stylesheet" th:href="@{/plugins/overlayScrollbars/css/OverlayScrollbars.min.css}">
    <link rel="stylesheet" th:href="@{/plugins/daterangepicker/daterangepicker.css}">
    <link rel="stylesheet" th:href="@{/plugins/summernote/summernote-bs4.css}">
    <link th:href="@{https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700}" rel="stylesheet">
</head>
<body class="hold-transition layout-top-nav">
<div class="wrapper">
    <nav class="main-header navbar navbar-expand-md navbar-light navbar-white">
        <div class="container">
            <div class="collapse navbar-collapse order-3">
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/admin/index}">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/admin/patient}">患者</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/admin/doctor}">医生</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/admin/drug}">药物</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/admin/exam}">检测</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/admin/bed}">床位</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/admin/schedule}">排班</a>
                    </li>
                </ul>
            </div>
            <ul class="order-1 order-md-3 navbar-nav navbar-no-expand ml-auto">
                <li class="nav-link">
                    <a class="nav-link" href="/doctor/index" th:text="${session.username}"></a>
                </li>
                <li class="nav-link">
                    <a class="nav-link" href="/logout" th:text="'注销'"></a>
                </li>
            </ul>
        </div>
    </nav>
    <div class="content-wrapper">
        <div class="content-header">
        </div>
        <div class="content">
            <div class="container">
                <div class="row">
                    <div class="col-12">
                        <div class="card">
                            <div class="card-header">
                                <h3 class="card-title">编辑医生排班</h3>
                            </div>
                            <div class="card-body">
                                <form th:action="@{/admin/schedule/save}" th:object="${schedule}" method="post">
                                    <input type="hidden" th:field="*{id}"/>
                                    <div class="form-group">
                                        <label for="doctorName">医生姓名:</label>
                                        <input type="text" id="doctorName" name="doctorName" class="form-control" th:value="${schedule.doctor.name}" required/>
                                    </div>
                                    <div class="form-group">
                                        <label for="startDay">开始日期:</label>
                                        <select id="startDay" name="startDay" class="form-control" required>
                                            <option th:each="day : ${weekDays}" th:value="${day}" th:text="${day}" th:selected="${day == schedule.startDay}"></option>
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <label for="endDay">结束日期:</label>
                                        <select id="endDay" name="endDay" class="form-control" required>
                                            <option th:each="day : ${weekDays}" th:value="${day}" th:text="${day}" th:selected="${day == schedule.endDay}"></option>
                                        </select>
                                    </div>
                                    <button type="submit" class="btn btn-primary">保存</button>
                                    <a th:href="@{/admin/schedule}" class="btn btn-secondary">取消</a>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div th:insert="temp::footer"></div>
</div>

<!-- jQuery -->
<script th:src="@{/plugins/jquery/jquery.min.js}"></script>
<!-- Bootstrap 4 -->
<script th:src="@{/plugins/bootstrap/js/bootstrap.bundle.min.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/dist/js/adminlte.min.js}"></script>
<!-- Moment.js -->
<script th:src="@{/plugins/moment/moment.min.js}"></script>
<!-- Tempus Dominus Bootstrap 4 -->
<script th:src="@{/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js}"></script>


